Even if it is legal, mixing case and non-case labels in the body of a switch statement is very confusing and can even be the result of a typing
error.
Noncompliant code example
The code is syntactically correct but the behavior is not the expected one
switch (day) {
case MONDAY:
case TUESDAY:
WEDNESDAY: // instead of "case WEDNESDAY"
doSomething();
break;
...
}
Compliant solution
switch (day) {
case MONDAY:
case TUESDAY:
case WEDNESDAY:
doSomething();
break;
...
}